#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#define N 10

int main(){
    uint32_t a[N];

    printf("**** a = %p\n", a);
    
    uint32_t i;
    for(i=0; i<N; i++){
        a[i] = i+1;
        printf("addr of a[%d] = %p, a+%2d == %p\n", i, &a[i], i, a+i);
    }

/*    uint32_t size_uchar = sizeof(unsigned char);*/
/*    uint32_t size_ui32t = sizeof(uint32_t);*/
/*    printf("size_uchar = %u\n", size_uchar);*/
/*    printf("size_ui32t = %u\n", size_ui32t);*/

    FILE *fp = fopen("dbg.bin", "wab");

    uint32_t *ptr = a;
    uint32_t j=0;
    while( j < 5 ){
        fwrite((void*)ptr, sizeof(unsigned char), 2*4, fp);
        ptr += 2;
        j++;
    }
    fclose(fp);
    
    return 0;
}
